public class Login {

    private String userName;
    private String passWord;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }


    public void logInfo(String userName, String passWord) {

        if (!getUserName().equals(userName)) {
            System.out.println("用户名错误");
            System.exit(1);
        }
        if (!getPassWord().equals(passWord)) {
            System.out.println("密码错误");
            System.exit(1);
        }
    }
}
